package com.heima.wemedia.thread;

import com.heima.model.wemedia.pojos.WmUser;

public class WmUserThreadLocal {
    //1 声明一个ThreadLocal类型的变量
    private static ThreadLocal<WmUser> userThreadLocal = new ThreadLocal<>();

    //2 为这个变量配置一对 get set 方法


    public static WmUser get() {
        return userThreadLocal.get();
    }

    public static void set(WmUser wmUser) {
        userThreadLocal.set(wmUser);
    }
    //3 为这个变量配置一个 remove 方法
    public static  void remove(){
        userThreadLocal.remove();
    }
}
